﻿using Domain.Entity.System_setting;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configer.System_setting
{
    public class Ment_employeeConfiger : IEntityTypeConfiguration<Ment_employee>
    {
        public void Configure(EntityTypeBuilder<Ment_employee> builder)
        {
            builder.ToTable(nameof(Ment_employee));
            builder.HasKey(e => e.Emp_id);
            builder.Property(e => e.Depart_id).HasColumnType("bigint");
            builder.Property(e => e.Emp_id).HasColumnType("bigint");
            builder.Property(e => e.Emp_name).HasColumnType("varchar(64)").IsRequired();
            builder.Property(e => e.Emp_account).HasColumnType("varchar(64)").IsRequired();
            builder.Property(e => e.Emp_password).HasColumnType("varchar(64)").IsRequired();
            builder.Property(e => e.Emp_mobile).HasColumnType("varchar(11)").IsRequired();
            builder.Property(e => e.Emp_status).HasColumnType("tinyint").IsRequired().HasComment("员工状态：0、启用 1、禁用");
            builder.Property(e => e.Emp_remark).HasColumnType("varchar(500)").IsRequired(false);
            builder.Property(e => e.Create_by).HasColumnType("varchar(64)").IsRequired();
            builder.Property(e => e.Create_time).HasColumnType("DateTime");
            builder.Property(e => e.Update_by).HasColumnType("varchar(64)").IsRequired(false);
            builder.Property(e => e.Update_time).HasColumnType("DateTime");
            builder.Property(e => e.Is_del).HasColumnType("tinyint").IsRequired().HasComment("删除状态：0、未删除 1、已删除");
        }
    }
}
